<template>
	<div class="component-item" :class="active?'selected':''" v-if="moduleData">
		<div class="flex center preview-item-top">
			<div class="del" @click.stop="delModule">
				<Icon type="ios-trash" size='22' style="color: white;" />
			</div>
		</div>
        <div class="component-content">
           <div class="secKillBox">
                <div class="">
                    <div class="component-title">{{moduleData.label_name_cn}}</div>
                    <div class="component-desc	">{{moduleData.label_info_summary}}</div>
                </div>
                <div class="img-content disFlex Flex-middle">
                    <div class="img-wrapper" v-for="item in moduleData.data">
                        <div class="bgCover img" :style="'background-image: url('+ item.image_path +')'"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
  	name: 'SecondKillModule',		
	props: {
		/**
	     * @description 起始值，即动画开始前显示的数值
	     */
	    moduleData: {
	      type: Object,
	      default: null
	    },
	    active: {
	    	type: Boolean,
	    	default: false
	    }
	},
    data () {
        return {
        	curpage: 0
    	}
    },
    methods: {
    	delModule() {
            this.$emit("delModule",this.moduleData);        
    	}
    },
    created() {
    },
    components: {
	}
 }
</script>

<style scoped>
@import url("../baseModule.less");
.img-content {
	overflow-x: auto;
}	
.img-wrapper {
	min-width: 120px;
	width: 120px;
	height: 85px;
	margin-right: 6px;
}
.img-wrapper .img {
	width: 100%;
	height: 100%;
	background: #f2f2f2;
}
   	
</style>
